home *** CD-ROM | disk | FTP | other *** search
- Path: thor.tu.hac.com!collins
- From: collins@thor.tu.hac.com (Ron Collins)
- Newsgroups: comp.lang.c
- Subject: Re: Newbie Q: Arrays > 64K?
- Date: 5 Feb 1996 19:09:40 GMT
- Organization: Advanced Depot Systems
- Message-ID: <4f5klk$nru@hacgate2.hac.com>
- References: <4f3ajc$oud@earth.superlink.net>
- NNTP-Posting-Host: thor.tu.hac.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- rizzom@superlink.net wrote:
- : Hi,
-
- : I am using Turbo C++ 3.0 in DOS. I would just like to know
- : how to declare an array that is larger than 64K. I have tried
- : all of the memory models available and still get an error
- : saying Array too large. Here is the code:
- [snip]
-
- You can't. In DOS, each data segment is limited to 64K in size; since your
- compiler will not split an array across data segments, that means that the
- maximum size for any array is also limited to 64K.
-
- You can get around this by switching to Windows (if you like banging your
- head into a wall), buying a DOS extender (expensive and clumsy to use),
- or switching to a _real_ OS (such as Linux) that doesn't have these
- limitations.
-
- Or, of course, you can just re-code your application to use smaller arrays.
-
-
- -- collins --
-
-